![]() |
NewPixMap |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Creates a new, initialized PixMap structure.
PixMapHandle NewPixMap ();
A handle to the new PixMap structure.
All fields of the PixMap structure are copied from the current device’s PixMap structure except the color table. In System 7, the hRes and vRes fields are set to 72 dpi, no matter what values the current device’s PixMap structure contains. A handle to the color table is allocated but not initialized.
Typically, you do not need to call this function because PixMap structures are created for you when you create a window using the Window Manager functions NewCWindow and GetNewCWindow and when you create an offscreen graphics world with the NewGWorld function.
If your application creates a pixel map, your application must initialize the PixMap structure’s color table to describe the pixels. Use the GetCTable function to read such a table from a resource file. Use the DisposeCTable function to dispose of the PixMap structure’s color table and replace it with the one returned by GetCTable.
The NewPixMap function may move or purge memory blocks in the application heap; do not call this function at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)